'''
@author: fenghxue
'''
import unittest
from unittest import mock
from calculator.module import Count


class Test(unittest.TestCase):

    @unittest.skip
    def testAdd(self):
        count = Count()            
        count.add = mock.Mock(return_value=13, side_effect=count.add)
        result = count.add(8, 8)
        print(result)
        count.add.assert_called_with(8, 8)
        self.assertEqual(result, 16)
        
    def testAddAndMultiple(self):
        x = 3
        y = 4
        count = Count()
        add,multi = count.add_and_multiple(x, y)
        self.assertEqual(7, add)
        self.assertEqual(12, multi)


if __name__ == "__main__":
    #import sys;sys.argv = ['', 'Test.testAdd']
    unittest.main()